package com.springapp.mvc.service.impl;

import com.springapp.mvc.dao.bean.CallRecords;
import com.springapp.mvc.dao.mapper.EXCallRecordsMapper;
import com.springapp.mvc.service.Interface.CallRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by qinyy on 2018/7/15.
 */
@Service
public class CallRecordsServiceImpl implements CallRecordsService
{

    @Autowired(required = false)
    private EXCallRecordsMapper mExCallRecordsMapper;

    @Override
    public void insertCallRecords(List<CallRecords> recordsList)
    {
        mExCallRecordsMapper.multyInsertRecords(recordsList);

    }

    @Override
    public List<CallRecords> queryCallRecords(int limit, int offset, String sortPro, String sortType)
    {
        return mExCallRecordsMapper.queryCallRecords(limit,offset,sortPro,sortType);
    }

    @Override
    public int getTotalCount()
    {
        return mExCallRecordsMapper.getTotalNum();
    }

    @Override
    public int deleteRecord(long callId) {
        return mExCallRecordsMapper.deleteByPrimaryKey(callId);
    }
}
